Hi Tom,
I'm just shooting the last few bugs in my modifications for true 5-axis motion, and I noticed that the function tp_calc_seg_trip_states() in TrajectoryPlanner.cpp will often generate very small time trips (like about 10**-17 sec), usually when I am breaking down a non-linear motion into small steps. So, mainly to improve readability of traces, but also to reduce USB traffic, I added some code to eliminate those small trip states:
// time to achieve max vel
ta = (VM - V0)/A;
// Truncate tiny times (occur from rounding error) - the threshold is the time slice time in the kflop (90us).
if (ta < 9.0E-5) {
ta = 0.;
V0 = VM;
}
// dist to achieve max vel
da = (V0 + 0.5 * A * ta) * ta;
// time to decel from max vel
td = (VM - V1)/D;
if (td < 9.0E-5) {
td = 0.;
}
// dist to decel from max vel
dd = (V1 + 0.5 * D * td) * td;(my changes highlit).